#ifndef ImageItem_First
#define ImageItem_First
#ifdef __GNUG__
#pragma interface
#endif

#include "VObject.h"

//---- ImageItem ---------------------------------------------------------------

class ImageItem : public VObject {
protected:
	Bitmap *bmp;
	short base;
	bool deleteBitmap;
public:
	MetaDef(ImageItem);

	ImageItem(Bitmap *b, int base= 0, bool freeold= FALSE);
	ImageItem(int id, Bitmap *b, int base= 0, bool freeold= FALSE);
	ImageItem(short*, const Point &e, int base= 0);
	~ImageItem();

	void SetBitmap(Bitmap *bm, bool redraw= TRUE);
	Bitmap *GetBitmap()
		{ return bmp; }
	Metric GetMinSize();
	void SetBase(int b)
		{ base= b; }
	void Draw(Rectangle);
	void DoObserve(int, int part, void*, Object *op);
	OStream& PrintOn(OStream&);
	IStream& ReadFrom(IStream&);
};

#endif

